import request from "@/utils/request.js";

/**
 * 搜索小说请求
 * @param query
 * @returns {*}
 */
export const searchFictionListReq = (page,query) => {
    return  request.get('/chapter/search?pageSize='+page.pageSize +'&pageNum='+page.pageNum + '&query=' + query)
}
/**
 * 获取小说的详细信息以及章节
 * @param baseUrl
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getChapterInfoReq = (baseUrl) => {
    return request.get('/chapter/showInfo?baseUrl=' + baseUrl)
}

/**
 * 获取文章
 * @param baseUrl
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getContentReq = (baseUrl) => {
    return request.get("/chapter/content?url="+baseUrl)
}